package sctu.edu.java.year2016.team08.yangying.day20160602;

/**
 * Created by Administrator on 2016/6/2.
 */
import java.io.File;
import java.io.IOException;
import java.nio.channels.FileLockInterruptionException;

public class Ri {
    public static void main(String[] args) {

        File file = new File("D:/riri", "test.txt");
        if (file.exists()){
            file.delete();
            System.out.println("已删除文件");

        }else{
            try{
                file.createNewFile();
                System.out.println("文件已经创建");
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}